/*
 *
 *    Copyright (c) 2022 Project CHIP Authors
 *
 *    Licensed under the Apache License, Version 2.0 (the "License");
 *    you may not use this file except in compliance with the License.
 *    You may obtain a copy of the License at
 *
 *        http://www.apache.org/licenses/LICENSE-2.0
 *
 *    Unless required by applicable law or agreed to in writing, software
 *    distributed under the License is distributed on an "AS IS" BASIS,
 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *    See the License for the specific language governing permissions and
 *    limitations under the License.
 */

// THIS FILE IS GENERATED BY ZAP
// This file is generated from clusters-Commands.h.zapt

#pragma once

#include <app/data-model/DecodableList.h>
#include <app/data-model/Encode.h>
#include <app/data-model/List.h>
#include <app/data-model/NullObject.h>
#include <app/data-model/Nullable.h>
#include <lib/core/DataModelTypes.h>
#include <lib/core/Optional.h>
#include <lib/core/TLV.h>
#include <lib/support/BitMask.h>

#include <clusters/shared/Enums.h>
#include <clusters/shared/Structs.h>

#include <clusters/MediaPlayback/ClusterId.h>
#include <clusters/MediaPlayback/CommandIds.h>
#include <clusters/MediaPlayback/Enums.h>
#include <clusters/MediaPlayback/Structs.h>

#include <cstdint>

namespace chip
{
namespace app
{
	namespace Clusters
	{
		namespace MediaPlayback
		{
			namespace Commands
			{
				// Forward-declarations so we can reference these later.

				namespace Play
				{
					struct Type;
					struct DecodableType;
				} // namespace Play

				namespace Pause
				{
					struct Type;
					struct DecodableType;
				} // namespace Pause

				namespace Stop
				{
					struct Type;
					struct DecodableType;
				} // namespace Stop

				namespace StartOver
				{
					struct Type;
					struct DecodableType;
				} // namespace StartOver

				namespace Previous
				{
					struct Type;
					struct DecodableType;
				} // namespace Previous

				namespace Next
				{
					struct Type;
					struct DecodableType;
				} // namespace Next

				namespace Rewind
				{
					struct Type;
					struct DecodableType;
				} // namespace Rewind

				namespace FastForward
				{
					struct Type;
					struct DecodableType;
				} // namespace FastForward

				namespace SkipForward
				{
					struct Type;
					struct DecodableType;
				} // namespace SkipForward

				namespace SkipBackward
				{
					struct Type;
					struct DecodableType;
				} // namespace SkipBackward

				namespace PlaybackResponse
				{
					struct Type;
					struct DecodableType;
				} // namespace PlaybackResponse

				namespace Seek
				{
					struct Type;
					struct DecodableType;
				} // namespace Seek

				namespace ActivateAudioTrack
				{
					struct Type;
					struct DecodableType;
				} // namespace ActivateAudioTrack

				namespace ActivateTextTrack
				{
					struct Type;
					struct DecodableType;
				} // namespace ActivateTextTrack

				namespace DeactivateTextTrack
				{
					struct Type;
					struct DecodableType;
				} // namespace DeactivateTextTrack

			} // namespace Commands

			namespace Commands
			{
				namespace Play
				{
					enum class Fields : uint8_t {};

					struct Type {
					public:
						// Use GetCommandId instead of commandId directly to avoid naming
						// conflict with CommandIdentification in ExecutionOfACommand
						static constexpr CommandId GetCommandId() { return Commands::Play::Id; }
						static constexpr ClusterId GetClusterId()
						{
							return Clusters::MediaPlayback::Id;
						}

						CHIP_ERROR Encode(TLV::TLVWriter &aWriter, TLV::Tag aTag) const;

						using ResponseType = Clusters::MediaPlayback::Commands::
							PlaybackResponse::DecodableType;

						static constexpr bool MustUseTimedInvoke() { return false; }
					};

					struct DecodableType {
					public:
						static constexpr CommandId GetCommandId() { return Commands::Play::Id; }
						static constexpr ClusterId GetClusterId()
						{
							return Clusters::MediaPlayback::Id;
						}
						static constexpr bool kIsFabricScoped = false;

						CHIP_ERROR Decode(TLV::TLVReader &reader);
					};
				}; // namespace Play
				namespace Pause
				{
					enum class Fields : uint8_t {};

					struct Type {
					public:
						// Use GetCommandId instead of commandId directly to avoid naming
						// conflict with CommandIdentification in ExecutionOfACommand
						static constexpr CommandId GetCommandId()
						{
							return Commands::Pause::Id;
						}
						static constexpr ClusterId GetClusterId()
						{
							return Clusters::MediaPlayback::Id;
						}

						CHIP_ERROR Encode(TLV::TLVWriter &aWriter, TLV::Tag aTag) const;

						using ResponseType = Clusters::MediaPlayback::Commands::
							PlaybackResponse::DecodableType;

						static constexpr bool MustUseTimedInvoke() { return false; }
					};

					struct DecodableType {
					public:
						static constexpr CommandId GetCommandId()
						{
							return Commands::Pause::Id;
						}
						static constexpr ClusterId GetClusterId()
						{
							return Clusters::MediaPlayback::Id;
						}
						static constexpr bool kIsFabricScoped = false;

						CHIP_ERROR Decode(TLV::TLVReader &reader);
					};
				}; // namespace Pause
				namespace Stop
				{
					enum class Fields : uint8_t {};

					struct Type {
					public:
						// Use GetCommandId instead of commandId directly to avoid naming
						// conflict with CommandIdentification in ExecutionOfACommand
						static constexpr CommandId GetCommandId() { return Commands::Stop::Id; }
						static constexpr ClusterId GetClusterId()
						{
							return Clusters::MediaPlayback::Id;
						}

						CHIP_ERROR Encode(TLV::TLVWriter &aWriter, TLV::Tag aTag) const;

						using ResponseType = Clusters::MediaPlayback::Commands::
							PlaybackResponse::DecodableType;

						static constexpr bool MustUseTimedInvoke() { return false; }
					};

					struct DecodableType {
					public:
						static constexpr CommandId GetCommandId() { return Commands::Stop::Id; }
						static constexpr ClusterId GetClusterId()
						{
							return Clusters::MediaPlayback::Id;
						}
						static constexpr bool kIsFabricScoped = false;

						CHIP_ERROR Decode(TLV::TLVReader &reader);
					};
				}; // namespace Stop
				namespace StartOver
				{
					enum class Fields : uint8_t {};

					struct Type {
					public:
						// Use GetCommandId instead of commandId directly to avoid naming
						// conflict with CommandIdentification in ExecutionOfACommand
						static constexpr CommandId GetCommandId()
						{
							return Commands::StartOver::Id;
						}
						static constexpr ClusterId GetClusterId()
						{
							return Clusters::MediaPlayback::Id;
						}

						CHIP_ERROR Encode(TLV::TLVWriter &aWriter, TLV::Tag aTag) const;

						using ResponseType = Clusters::MediaPlayback::Commands::
							PlaybackResponse::DecodableType;

						static constexpr bool MustUseTimedInvoke() { return false; }
					};

					struct DecodableType {
					public:
						static constexpr CommandId GetCommandId()
						{
							return Commands::StartOver::Id;
						}
						static constexpr ClusterId GetClusterId()
						{
							return Clusters::MediaPlayback::Id;
						}
						static constexpr bool kIsFabricScoped = false;

						CHIP_ERROR Decode(TLV::TLVReader &reader);
					};
				}; // namespace StartOver
				namespace Previous
				{
					enum class Fields : uint8_t {};

					struct Type {
					public:
						// Use GetCommandId instead of commandId directly to avoid naming
						// conflict with CommandIdentification in ExecutionOfACommand
						static constexpr CommandId GetCommandId()
						{
							return Commands::Previous::Id;
						}
						static constexpr ClusterId GetClusterId()
						{
							return Clusters::MediaPlayback::Id;
						}

						CHIP_ERROR Encode(TLV::TLVWriter &aWriter, TLV::Tag aTag) const;

						using ResponseType = Clusters::MediaPlayback::Commands::
							PlaybackResponse::DecodableType;

						static constexpr bool MustUseTimedInvoke() { return false; }
					};

					struct DecodableType {
					public:
						static constexpr CommandId GetCommandId()
						{
							return Commands::Previous::Id;
						}
						static constexpr ClusterId GetClusterId()
						{
							return Clusters::MediaPlayback::Id;
						}
						static constexpr bool kIsFabricScoped = false;

						CHIP_ERROR Decode(TLV::TLVReader &reader);
					};
				}; // namespace Previous
				namespace Next
				{
					enum class Fields : uint8_t {};

					struct Type {
					public:
						// Use GetCommandId instead of commandId directly to avoid naming
						// conflict with CommandIdentification in ExecutionOfACommand
						static constexpr CommandId GetCommandId() { return Commands::Next::Id; }
						static constexpr ClusterId GetClusterId()
						{
							return Clusters::MediaPlayback::Id;
						}

						CHIP_ERROR Encode(TLV::TLVWriter &aWriter, TLV::Tag aTag) const;

						using ResponseType = Clusters::MediaPlayback::Commands::
							PlaybackResponse::DecodableType;

						static constexpr bool MustUseTimedInvoke() { return false; }
					};

					struct DecodableType {
					public:
						static constexpr CommandId GetCommandId() { return Commands::Next::Id; }
						static constexpr ClusterId GetClusterId()
						{
							return Clusters::MediaPlayback::Id;
						}
						static constexpr bool kIsFabricScoped = false;

						CHIP_ERROR Decode(TLV::TLVReader &reader);
					};
				}; // namespace Next
				namespace Rewind
				{
					enum class Fields : uint8_t {
						kAudioAdvanceUnmuted = 0,
					};

					struct Type {
					public:
						// Use GetCommandId instead of commandId directly to avoid naming
						// conflict with CommandIdentification in ExecutionOfACommand
						static constexpr CommandId GetCommandId()
						{
							return Commands::Rewind::Id;
						}
						static constexpr ClusterId GetClusterId()
						{
							return Clusters::MediaPlayback::Id;
						}

						Optional<bool> audioAdvanceUnmuted;

						CHIP_ERROR Encode(TLV::TLVWriter &aWriter, TLV::Tag aTag) const;

						using ResponseType = Clusters::MediaPlayback::Commands::
							PlaybackResponse::DecodableType;

						static constexpr bool MustUseTimedInvoke() { return false; }
					};

					struct DecodableType {
					public:
						static constexpr CommandId GetCommandId()
						{
							return Commands::Rewind::Id;
						}
						static constexpr ClusterId GetClusterId()
						{
							return Clusters::MediaPlayback::Id;
						}
						static constexpr bool kIsFabricScoped = false;

						Optional<bool> audioAdvanceUnmuted;

						CHIP_ERROR Decode(TLV::TLVReader &reader);
					};
				}; // namespace Rewind
				namespace FastForward
				{
					enum class Fields : uint8_t {
						kAudioAdvanceUnmuted = 0,
					};

					struct Type {
					public:
						// Use GetCommandId instead of commandId directly to avoid naming
						// conflict with CommandIdentification in ExecutionOfACommand
						static constexpr CommandId GetCommandId()
						{
							return Commands::FastForward::Id;
						}
						static constexpr ClusterId GetClusterId()
						{
							return Clusters::MediaPlayback::Id;
						}

						Optional<bool> audioAdvanceUnmuted;

						CHIP_ERROR Encode(TLV::TLVWriter &aWriter, TLV::Tag aTag) const;

						using ResponseType = Clusters::MediaPlayback::Commands::
							PlaybackResponse::DecodableType;

						static constexpr bool MustUseTimedInvoke() { return false; }
					};

					struct DecodableType {
					public:
						static constexpr CommandId GetCommandId()
						{
							return Commands::FastForward::Id;
						}
						static constexpr ClusterId GetClusterId()
						{
							return Clusters::MediaPlayback::Id;
						}
						static constexpr bool kIsFabricScoped = false;

						Optional<bool> audioAdvanceUnmuted;

						CHIP_ERROR Decode(TLV::TLVReader &reader);
					};
				}; // namespace FastForward
				namespace SkipForward
				{
					enum class Fields : uint8_t {
						kDeltaPositionMilliseconds = 0,
					};

					struct Type {
					public:
						// Use GetCommandId instead of commandId directly to avoid naming
						// conflict with CommandIdentification in ExecutionOfACommand
						static constexpr CommandId GetCommandId()
						{
							return Commands::SkipForward::Id;
						}
						static constexpr ClusterId GetClusterId()
						{
							return Clusters::MediaPlayback::Id;
						}

						uint64_t deltaPositionMilliseconds = static_cast<uint64_t>(0);

						CHIP_ERROR Encode(TLV::TLVWriter &aWriter, TLV::Tag aTag) const;

						using ResponseType = Clusters::MediaPlayback::Commands::
							PlaybackResponse::DecodableType;

						static constexpr bool MustUseTimedInvoke() { return false; }
					};

					struct DecodableType {
					public:
						static constexpr CommandId GetCommandId()
						{
							return Commands::SkipForward::Id;
						}
						static constexpr ClusterId GetClusterId()
						{
							return Clusters::MediaPlayback::Id;
						}
						static constexpr bool kIsFabricScoped = false;

						uint64_t deltaPositionMilliseconds = static_cast<uint64_t>(0);

						CHIP_ERROR Decode(TLV::TLVReader &reader);
					};
				}; // namespace SkipForward
				namespace SkipBackward
				{
					enum class Fields : uint8_t {
						kDeltaPositionMilliseconds = 0,
					};

					struct Type {
					public:
						// Use GetCommandId instead of commandId directly to avoid naming
						// conflict with CommandIdentification in ExecutionOfACommand
						static constexpr CommandId GetCommandId()
						{
							return Commands::SkipBackward::Id;
						}
						static constexpr ClusterId GetClusterId()
						{
							return Clusters::MediaPlayback::Id;
						}

						uint64_t deltaPositionMilliseconds = static_cast<uint64_t>(0);

						CHIP_ERROR Encode(TLV::TLVWriter &aWriter, TLV::Tag aTag) const;

						using ResponseType = Clusters::MediaPlayback::Commands::
							PlaybackResponse::DecodableType;

						static constexpr bool MustUseTimedInvoke() { return false; }
					};

					struct DecodableType {
					public:
						static constexpr CommandId GetCommandId()
						{
							return Commands::SkipBackward::Id;
						}
						static constexpr ClusterId GetClusterId()
						{
							return Clusters::MediaPlayback::Id;
						}
						static constexpr bool kIsFabricScoped = false;

						uint64_t deltaPositionMilliseconds = static_cast<uint64_t>(0);

						CHIP_ERROR Decode(TLV::TLVReader &reader);
					};
				}; // namespace SkipBackward
				namespace PlaybackResponse
				{
					enum class Fields : uint8_t {
						kStatus = 0,
						kData = 1,
					};

					struct Type {
					public:
						// Use GetCommandId instead of commandId directly to avoid naming
						// conflict with CommandIdentification in ExecutionOfACommand
						static constexpr CommandId GetCommandId()
						{
							return Commands::PlaybackResponse::Id;
						}
						static constexpr ClusterId GetClusterId()
						{
							return Clusters::MediaPlayback::Id;
						}

						StatusEnum status = static_cast<StatusEnum>(0);
						Optional<chip::CharSpan> data;

						CHIP_ERROR Encode(DataModel::FabricAwareTLVWriter &aWriter,
								  TLV::Tag aTag) const;

						using ResponseType = DataModel::NullObjectType;

						static constexpr bool MustUseTimedInvoke() { return false; }
					};

					struct DecodableType {
					public:
						static constexpr CommandId GetCommandId()
						{
							return Commands::PlaybackResponse::Id;
						}
						static constexpr ClusterId GetClusterId()
						{
							return Clusters::MediaPlayback::Id;
						}

						StatusEnum status = static_cast<StatusEnum>(0);
						Optional<chip::CharSpan> data;

						CHIP_ERROR Decode(TLV::TLVReader &reader);
					};
				}; // namespace PlaybackResponse
				namespace Seek
				{
					enum class Fields : uint8_t {
						kPosition = 0,
					};

					struct Type {
					public:
						// Use GetCommandId instead of commandId directly to avoid naming
						// conflict with CommandIdentification in ExecutionOfACommand
						static constexpr CommandId GetCommandId() { return Commands::Seek::Id; }
						static constexpr ClusterId GetClusterId()
						{
							return Clusters::MediaPlayback::Id;
						}

						uint64_t position = static_cast<uint64_t>(0);

						CHIP_ERROR Encode(TLV::TLVWriter &aWriter, TLV::Tag aTag) const;

						using ResponseType = Clusters::MediaPlayback::Commands::
							PlaybackResponse::DecodableType;

						static constexpr bool MustUseTimedInvoke() { return false; }
					};

					struct DecodableType {
					public:
						static constexpr CommandId GetCommandId() { return Commands::Seek::Id; }
						static constexpr ClusterId GetClusterId()
						{
							return Clusters::MediaPlayback::Id;
						}
						static constexpr bool kIsFabricScoped = false;

						uint64_t position = static_cast<uint64_t>(0);

						CHIP_ERROR Decode(TLV::TLVReader &reader);
					};
				}; // namespace Seek
				namespace ActivateAudioTrack
				{
					enum class Fields : uint8_t {
						kTrackID = 0,
						kAudioOutputIndex = 1,
					};

					struct Type {
					public:
						// Use GetCommandId instead of commandId directly to avoid naming
						// conflict with CommandIdentification in ExecutionOfACommand
						static constexpr CommandId GetCommandId()
						{
							return Commands::ActivateAudioTrack::Id;
						}
						static constexpr ClusterId GetClusterId()
						{
							return Clusters::MediaPlayback::Id;
						}

						chip::CharSpan trackID;
						uint8_t audioOutputIndex = static_cast<uint8_t>(0);

						CHIP_ERROR Encode(TLV::TLVWriter &aWriter, TLV::Tag aTag) const;

						using ResponseType = DataModel::NullObjectType;

						static constexpr bool MustUseTimedInvoke() { return false; }
					};

					struct DecodableType {
					public:
						static constexpr CommandId GetCommandId()
						{
							return Commands::ActivateAudioTrack::Id;
						}
						static constexpr ClusterId GetClusterId()
						{
							return Clusters::MediaPlayback::Id;
						}
						static constexpr bool kIsFabricScoped = false;

						chip::CharSpan trackID;
						uint8_t audioOutputIndex = static_cast<uint8_t>(0);

						CHIP_ERROR Decode(TLV::TLVReader &reader);
					};
				}; // namespace ActivateAudioTrack
				namespace ActivateTextTrack
				{
					enum class Fields : uint8_t {
						kTrackID = 0,
					};

					struct Type {
					public:
						// Use GetCommandId instead of commandId directly to avoid naming
						// conflict with CommandIdentification in ExecutionOfACommand
						static constexpr CommandId GetCommandId()
						{
							return Commands::ActivateTextTrack::Id;
						}
						static constexpr ClusterId GetClusterId()
						{
							return Clusters::MediaPlayback::Id;
						}

						chip::CharSpan trackID;

						CHIP_ERROR Encode(TLV::TLVWriter &aWriter, TLV::Tag aTag) const;

						using ResponseType = DataModel::NullObjectType;

						static constexpr bool MustUseTimedInvoke() { return false; }
					};

					struct DecodableType {
					public:
						static constexpr CommandId GetCommandId()
						{
							return Commands::ActivateTextTrack::Id;
						}
						static constexpr ClusterId GetClusterId()
						{
							return Clusters::MediaPlayback::Id;
						}
						static constexpr bool kIsFabricScoped = false;

						chip::CharSpan trackID;

						CHIP_ERROR Decode(TLV::TLVReader &reader);
					};
				}; // namespace ActivateTextTrack
				namespace DeactivateTextTrack
				{
					enum class Fields : uint8_t {};

					struct Type {
					public:
						// Use GetCommandId instead of commandId directly to avoid naming
						// conflict with CommandIdentification in ExecutionOfACommand
						static constexpr CommandId GetCommandId()
						{
							return Commands::DeactivateTextTrack::Id;
						}
						static constexpr ClusterId GetClusterId()
						{
							return Clusters::MediaPlayback::Id;
						}

						CHIP_ERROR Encode(TLV::TLVWriter &aWriter, TLV::Tag aTag) const;

						using ResponseType = DataModel::NullObjectType;

						static constexpr bool MustUseTimedInvoke() { return false; }
					};

					struct DecodableType {
					public:
						static constexpr CommandId GetCommandId()
						{
							return Commands::DeactivateTextTrack::Id;
						}
						static constexpr ClusterId GetClusterId()
						{
							return Clusters::MediaPlayback::Id;
						}
						static constexpr bool kIsFabricScoped = false;

						CHIP_ERROR Decode(TLV::TLVReader &reader);
					};
				}; // namespace DeactivateTextTrack
			} // namespace Commands
		} // namespace MediaPlayback
	} // namespace Clusters
} // namespace app
} // namespace chip
